<?php
	$email 	= array('id'=>'email','class'=>'form-control', 'name'=>'email', 'value'=> set_value('email'),'type'=>'email','required'=>'');
	$password 	= array('id'=>'password', 'class'=>'form-control', 'name'=>'password', 'value'=> '','type'=>'password','required' =>'');
?>
<?php echo form_open('dang-nhap');?>
	<div id="error" class="none">
		<?php if ($message = $this->session->userdata('message')):?>
		<div class="alert alert-success" role="alert">
			<button type="button" class="close" data-dismiss="alert">
				<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
			</button>
		<?php echo $message;$this->session->unset_userdata('message');?>
		</div>
		<?php endif;?>
		<?php if ($danger = $this->session->userdata('danger')):?>
		<div class="alert alert-danger" role="alert">
			<button type="button" class="close" data-dismiss="alert">
				<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
			</button>
		<?php echo $danger;$this->session->unset_userdata('danger');?>
		</div>
		<?php endif;?>
		<?php if(isset($error)):?>
		<div class="alert alert-danger" role="alert">
			<button type="button" class="close" data-dismiss="alert">
				<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
			</button>
		<?php echo $error;?>					
		</div>
		<?php endif;?>
	</div>
	<div class="col-md-3 col-sm-3">
	</div>
	<div class="col-md-6 col-sm-6">
		<div class="form-group">
			<label for="email">Tài khoản/Email</label>
			<?php echo form_input($email);?>
		</div>
		<div class="form-group">
			<label for="password">Mật khẩu</label>
			<?php echo form_input($password);?>
		</div>
		<?php $return = $this->session->flashdata('return');
			if(!$return) $return = set_value('return');
		?>
		<input type="hidden" name="return" value="<?=$return;?>" />
		<input type="submit" class="btn btn-primary" value="Đăng nhập"> &nbsp; <a href="<?=site_url('dang-ky/quen-mat-khau')?>">Quên mật khẩu</a>
	</div>
	<div class="col-md-3 col-sm-3">
	</div>	
<?php echo form_close();?>